import { Body, Controller, Post } from '@nestjs/common';
import { PageDto } from './dto';
import { ResponseUtilService } from '@app/response-util';
import { DtoPipe } from '../../pipe/dto/dto.pipe';
import { UserService } from './user.service';

@Controller('user')
export class UserController {
    constructor(
        private readonly service:UserService
    ){}


    @Post('page')
    async page(@Body(new DtoPipe({skipMissingProperties : true})) dto:PageDto) {
        const result = await this.service.page(dto)

        return ResponseUtilService.successRes(result)

    }
}
